How can I make the program stop execution further if certain conditions got matched in if

visit shbcf.ru